package collections4;

import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * @ClassName: CollectionUtil
 * @Author: liugui
 * @Date: 2020-07-15 16:05
 **/
public class CollectionUtil {
    public static void main(String[] args) {
        List<Object> arrayList = new ArrayList<>();
        System.out.println(isEmpty(arrayList));//true 是否为空
        System.out.println(CollectionUtils.isNotEmpty(arrayList));//false 是否不为空
        System.out.println(CollectionUtils.isFull(arrayList));//false 是否已满？

    }

    public static <E> boolean isEmpty(Collection<E> es){
        return CollectionUtils.isEmpty(es);
    }
}
